#ifndef _TERM_H_
#define _TERM_H_
#include <string>

static std::string RDFS_NS = "http://www.w3.org/2000/01/rdf-schema#";
static std::string RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
static std::string OWL_NS = "http://www.w3.org/2002/07/owl#";

static std::string RDFSSUBCLASS=RDFS_NS+"subClassOf";
static std::string RDFSSUBPROPERTY = RDFS_NS + "subPropertyOf";
static std::string RDFTYPE = RDF_NS+"type";
static std::string RDFSDOMAIN = RDFS_NS+"domain";
static std::string RDFSRANGE = RDFS_NS+"range";


typedef enum{
	RDFS_VARIABLE,
	RDFS_ATOM
}rdfs_term_type;

class Term{
private:
	int type;
	std::string name;
public:
	Term(){};
	Term(std::string n){
		name=n;
		if(!n.find("?")) type=RDFS_VARIABLE;
		else type=RDFS_ATOM;
	}
	Term(std::string n, rdfs_term_type t){
		name=n;
		type=t;
	}
	void setType(int i){
		type = i;
	}
	int getType(){return type;}
	void setName(std::string n){
		name = n;
	}
	std::string getName(){return name;}
	std::string toString(){
		std::string info;
		info = "the name is: " + name + " ,the type is ";
		info+= type?"Atom":"Variable";
		return  info;}
	~Term(){};
	Term &operator=(const Term &t){
		type= t.type;
		name= t.name;
		return *this;
	}
	bool isVariable(){
		if (type==RDFS_VARIABLE)
			return true;
		else
			return false;
	}

	bool match(Term node){
		return ( isVariable() || !(name.compare(node.getName())) );
	}
};

#endif
